<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="format-detection" content="telephone=no" />
    <!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 -->
    <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
    <meta name="msapplication-tap-highlight" content="no" />
    <title>banner demo</title>
    <style>
        .bodyStyle{
            font-size: 32px;
        }
    </style>
</head>
<body >
<div class="bodyStyle">
    <h1>demo</h1>
    <lu>
        <li><a href="javascript:admobAd.cacheInterstitial();">load Interstitial</a></li>
        <br/>
        <li><a href="javascript:showInterstitial();">show Interstitial</a></li>
        <br/>
        <li><a href="javascript:admobAd.showBanner(admobAd.AD_POSITION.BOTTOM_CENTER);">show banner</a></li>
        <br/>
        <li><a href="javascript:admobAd.showBannerAbsolute(0,50);">show banner absolute</a></li>
        <br/>
        <li><a href="javascript:admobAd.hideBanner()">hide banner</a></li>
    </lu>

</div>
 <div id="alertdiv"/>
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript">
    function showInterstitial(){
        admobAd.isInterstitialReady(function(isReady){
            if(isReady){
                admobAd.showInterstitial();
            }
        });
    }
    function onInterstitialReceive (message) {
        alert(message.type+" ,you can show it now");
        //admobAd.showInterstitial();//show it when received
    }
    function onReceiveFail (message) {
        document.getElementById("alertdiv").innerHTML="load fail: "+message.type+"  "+message.data;
    }
    function onDeviceReady() {
        admobAd.initInterstitial("institial id");//ios banner id
        admobAd.initBanner("admob banner id",admobAd.AD_SIZE.BANNER.width,admobAd.AD_SIZE.BANNER.height);//ios Interstitial
        document.addEventListener(admobAd.AdEvent.onInterstitialReceive, onInterstitialReceive, false);
        document.addEventListener(admobAd.AdEvent.onInterstitialFailedReceive,onReceiveFail, false);
        document.addEventListener(admobAd.AdEvent.onBannerFailedReceive,onReceiveFail, false);
    }

    document.addEventListener('deviceready',onDeviceReady, false);
</script>
</body>
</html>
